<head>
    <meta charset="UTF-8">
<title>算法训练 完数</title>
<link rel="stylesheet" href="../css/main.css">
</head>
 <p>
<p>&nbsp;</p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal">&nbsp;</p>
</p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><o:p><font size="3" face="Calibri"><strong>&nbsp;</strong></font></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><strong><font size="3"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">问题描述</span><span lang="EN-US"><o:p></o:p></span></font></strong></p>
<p style="text-indent: 21pt; margin: 0cm 0cm 0pt; mso-char-indent-count: 2.0" class="MsoNormal"><font size="3"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">一个数如果恰好等于它的因子之和，这个数就称为&ldquo;完数&rdquo;。例如，</span><span lang="EN-US"><font face="Calibri">6</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">的因子为</span><span lang="EN-US"><font face="Calibri">1</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">、</span><span lang="EN-US"><font face="Calibri">2</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">、</span><span lang="EN-US"><font face="Calibri">3</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">，而</span><span lang="EN-US"><font face="Calibri">6</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">＝</span><span lang="EN-US"><font face="Calibri">1</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">＋</span><span lang="EN-US"><font face="Calibri">2</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">＋</span><span lang="EN-US"><font face="Calibri">3</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">，因此</span><span lang="EN-US"><font face="Calibri">6</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">就是&ldquo;完数&rdquo;。又如，</span><span lang="EN-US"><font face="Calibri">28</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">的因子为</span><span lang="EN-US"><font face="Calibri">1</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">、</span><span lang="EN-US"><font face="Calibri">2</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">、</span><span lang="EN-US"><font face="Calibri">4</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">、</span><span lang="EN-US"><font face="Calibri">7</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">、</span><span lang="EN-US"><font face="Calibri">14</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">，而</span><span lang="EN-US"><font face="Calibri">28</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">＝</span><span lang="EN-US"><font face="Calibri">1</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">＋</span><span lang="EN-US"><font face="Calibri">2</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">＋</span><span lang="EN-US"><font face="Calibri">4</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">＋</span><span lang="EN-US"><font face="Calibri">7</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">＋</span><span lang="EN-US"><font face="Calibri">14</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">，因此</span><span lang="EN-US"><font face="Calibri">28</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">也是&ldquo;完数&rdquo;。编写一个程序，判断用户输入的一个数是否为&ldquo;完数&rdquo;。</span><span lang="EN-US"><o:p></o:p></span></font></p>
<p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><font size="3"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">输入格式：输入只有一行，即一个整数。</span><span lang="EN-US"><o:p></o:p></span></font></p>
<p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><font size="3"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">输出格式：输出只有一行，如果该数为完数，输出</span><span lang="EN-US"><font face="Calibri">yes</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">，否则输出</span><span lang="EN-US"><font face="Calibri">no</font></span><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">。</span><span lang="EN-US"><o:p></o:p></span></font></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><strong><font size="3"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">输入输出样例</span><span lang="EN-US"><o:p></o:p></span></font></strong></p>
<p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><font size="3"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">输入样例：</span><span lang="EN-US"><o:p></o:p></span></font></p>
<p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font face="Calibri"><font size="3">6<o:p></o:p></font></font></span></p>
<p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><font size="3"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">输出样例：</span><span lang="EN-US"><o:p></o:p></span></font></p>
<p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3"><font face="Calibri">yes<o:p></o:p></font></font></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><o:p><strong><font size="3" face="Calibri">&nbsp;</font></strong></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal">&nbsp;</p>